package com.lagou.controller;

import com.lagou.pojo.PageParam;
import com.lagou.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author czq
 * @date 2020/7/21 22:53
 */
@Controller
public class ArticleController {

    @Autowired
    private ArticleService articleService;

    @RequestMapping("/index")
    public String index(PageParam pageParam, Model model) {
        model.addAttribute("data", articleService.findList(pageParam));
        return "client/index";
    }
}
